import { useState } from 'react';
import WithCounter from './WithCounter';
const HoverCounter = (props: any) => {
  // const [count, setCount] = useState(0);
  // const incrementCount = () => {
  //   setCount(count + 1);
  // };
  return (
    <div>
      <h2 onMouseOver={props.incrementCount}>悬停{props.count}次</h2>
    </div>
  );
};

// export default HoverCounter;
export default WithCounter(HoverCounter);
